﻿using System;
using NopSolutions.NopCommerce.BusinessLogic.Providers;

namespace NopSolutions.NopCommerce.Web.Administration.Shipping.NemoExpressShipping
{
    public partial class ConfigureShippingUserControl : BaseNopAdministrationUserControl, IConfigureShippingRateComputationMethodModule
    {
        protected void Page_Load(object sender, EventArgs e) {
            if (!IsPostBack)
                BindData();
        }

        private void BindData() {
            var shippingMethods = ShippingService.GetAllShippingMethods();
            if (shippingMethods != null && shippingMethods.Count > 0) {
                ddlShippingMethods.DataSource = shippingMethods;
                ddlShippingMethods.DataValueField = "ShippingMethodId";
                ddlShippingMethods.DataTextField = "Name";
                ddlShippingMethods.DataBind();
            }
        }

        #region IConfigureShippingRateComputationMethodModule Members

        public void Save() {
            throw new NotImplementedException();
        }

        #endregion
    }
}